package com.ruoyan.service.impl;

import com.ruoyan.mapper.PurchaseMapper;
import com.ruoyan.pojo.Purchase;
import com.ruoyan.service.DepartmentService;
import com.ruoyan.service.EmployManageService;
import com.ruoyan.service.PurchaseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Package: com.ruoyan.service.impl
 * @ClassName: PurchaseServiceImpl
 * @Author: ruoyan1998
 * @CreateTime: 2021/6/7 21:22
 * @Description:
 */
@Service
public class PurchaseServiceImpl implements PurchaseService
{
    @Autowired
    PurchaseMapper purchaseMapper;

    @Autowired
    EmployManageService employManageService;

    @Autowired
    DepartmentService departmentService;

    @Override
    public List<Purchase> queryPurchaseList()
    {
        return purchaseMapper.queryPurchaseList();
    }

    @Override
    public Purchase queryPurchaseListById(int id)
    {
        return purchaseMapper.queryPurchaseListById(id);
    }

    @Override
    public int updatePurchase(Purchase purchase)
    {
        return purchaseMapper.updatePurchase(purchase);
    }

    @Override
    public int addPurchase(Purchase purchase)
    {
        return purchaseMapper.addPurchase(purchase);
    }

    @Override
    public int deletePurchase(int id)
    {
        return purchaseMapper.deletePurchase(id);
    }
}
